<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('产品型号')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select id="c-model_id" class="form-control selectpicker" name="row[model_id]" data-live-search="true">
                        <option value="">请选择产品型号</option>
                        {volist name="models" id="model"}
                        <option value="{$model.id}">{$model.product.name} - {$model.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('工序')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select id="c-process_id" class="form-control selectpicker" name="row[process_id]" data-live-search="true">
                        <option value="">请选择工序</option>
                        {volist name="processes" id="process"}
                        <option value="{$process.id}">{$process.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('物料')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select id="c-material_id" class="form-control selectpicker" name="row[material_id]" data-live-search="true">
                        <option value="">请选择物料</option>
                        {volist name="materials" id="material"}
                        <option value="{$material.id}">{$material.name} ({$material.code})</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('用量')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-quantity" class="form-control" name="row[quantity]" type="number" step="0.01" min="0" value="1" placeholder="每件产品需要的物料数量">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('损耗率(%)')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-loss_rate" class="form-control" name="row[loss_rate]" type="number" step="0.1" min="0" max="100" value="0" placeholder="物料损耗率百分比">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('是否必需')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="radio">
                        <label>
                            <input type="radio" name="row[is_required]" value="1" checked> 必需
                        </label>
                        <label>
                            <input type="radio" name="row[is_required]" value="0"> 非必需
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                </div>
            </div>
        </form>
    </div>
</div>
